Skip to content

docs(scripted_tool): shared context and state patterns#530

Merged
chaliy merged 1 commit intomainfrom
claude/shared-context-docs-3Kn4M
Mar 14, 2026
Merged

docs(scripted_tool): shared context and state patterns#530
chaliy merged 1 commit intomainfrom
claude/shared-context-docs-3Kn4M

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 14, 2026

Summary

Test plan

  • cargo test --lib scripted_tool — pass
  • cargo fmt --check — clean
  • cargo clippy --all-targets --all-features -- -D warnings — clean

Closes #522
Closes #524

Document the closure-capture pattern with Arc/Arc<Mutex<T>> for sharing
resources across tool callbacks (issue #522, Option C).

Document the LLM-as-state-carrier pattern for cross-execute() state
(issue #524, Option D). Add tests verifying fresh interpreter isolation
and Arc callback persistence across execute() calls.

4 new tests. Update spec 014.

Closes #522
Closes #524
@chaliy chaliy merged commit 64d6c7d into main Mar 14, 2026
22 checks passed
@chaliy chaliy deleted the claude/shared-context-docs-3Kn4M branch March 14, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(scripted_tool): optional persistent state across execute() calls feat(scripted_tool): shared context across tool callbacks

1 participant